﻿using System;
using System.Net;
using System.Windows;


namespace MetroEventbrite.External.Eventbrite
{
    public class EBAttendeeAnswer
    {

        public static EBAttendeeAnswer Load(SimpleJson.JsonObject jsonObj)
        {
            var result = new EBAttendeeAnswer();

            if (jsonObj.ContainsKey("question_id"))
            {
                result.QuestionId = jsonObj["question_id"].ToString();
            }

            if (jsonObj.ContainsKey("question"))
            {
                result.Question = jsonObj["question"].ToString();
            }

            if (jsonObj.ContainsKey("question_type"))
            {
                result.QuestionType = jsonObj["question_type"].ToString();
            }

            if (jsonObj.ContainsKey("answer_text"))
            {
                result.Answer = jsonObj["answer_text"].ToString();
            }
            return result;
        }

        public string QuestionId { get; set; }

        public string Question { get; set; }

        public string QuestionType { get; set; }

        public string Answer { get; set; }

    }
}
